using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

using miciv;

namespace micivCore.Level
{
    public class LevelEntityBase : Entity, ILevelAccessor
    {
        protected Level m_level;

        public LevelEntityBase()
        {

        }

        #region ILevelAccessor Members

        public Level Level
        {
            get
            {
                return this.m_level;
            }
            set
            {
                this.m_level = value;
                foreach (DictionaryEntry de in this.m_htblComponents)
                {
                    ILevelAccessor levelComponent = de.Value as ILevelAccessor;
                    if (null != levelComponent)
                    {
                        levelComponent.Level = value;
                    }
                }
            }
        }

        #endregion
    }
}
